



const KEY = 'hm-toutiao-pc-wh'



//保存用户信息

const setUser = user => {
    window.sessionStorage.setItem(KEY, JSON.stringify(user))
}

//获取用户信息

const getUser = () => {
    const localUear = window.sessionStorage.getItem(KEY)


    return JSON.parse(localUear || '{}')

}
//删除信息
const delUser = () => {
    window.sessionStorage.removeItem(KEY)

}
export default {
    setUser, getUser, delUser
}